GCInfo
Dump garbage collection encoding information for a managed method.
Syntax
!GCInfo [<MD>] [<IP>]
Parameters
<MD>
Method Description
Method description address for the managed method.  Can be obtained using the DumpStack command, for example.
<IP>
Instruction Pointer
Instruction pointer to an instruction in a managed method. Can be obtained using the ClrStack command, for example.
Example

The method descriptor used in this example is taken from one of the methods in the DumpStack command results.

0075f91c 0de6099e (MethodDesc 0xd78bbc8 +0x1e Behavior1.Behavior1.Start)

0:001> !GCInfo 0xd78bbc8 Normal 
JIT generated code Method
info block: method
    size      =   002F prolog
    size      =   11  epilog 
    size      =   7   epilog 
    count     =   1   epilog 
    end      =    yes saved  
    reg. mask  =   000F ebp
    frame =          yes fully  
    interruptible= yes 
    double align       = no  
    security check     = no  
    exception handlers = no  
    local alloc        = no  
    edit & continue    = yes  
    varargs            = no  
    argument   count   =   0 
    stack frame size   =   2 
    untracked count    =   0 
    var ptr tab count  =   0 
    epilog        at   0028
2F E5 9C C0 45 | 

Pointer table:
F0 BC 7B       | 000B        reg EDI becoming live 'this'
75             | 0010        reg ESI becoming live
4C             | 0014        reg ECX becoming live
F0 0A          | 001E        reg ECX becoming dead
30             | 001E        reg ESI becoming dead
F1 39          | 002F        reg EDI becoming dead
FF             | 
						
Comments

Description Sample Value Comment
Method Size 2F 0x0de609ae - 0x0de60980 (Addresses from the u example below)
Prolog Size 11 0x0de60990 - 0x0de60980 (See red segment below.)
Epilog Size 7 0x0de609ae - 0x0de609a8 (See blue segment below.)
Epilog count 1 Number of epilogs (method exits).
Epilog end yes Indicates whether the epilog is at the end of the method.
Saved reg. mask F
EBP frame yes
Fully interuptable yes Indicates whether the method contains critical sections.
Double align no
Security check no Indicates whether the method has a code security attribute.
Exception handlers no Indicates whether the method contains try-catch blocks.
Local alloc no
Edit & Continue yes
Varargs no Indicates whether this is a vararg calling convention.
Argument count 0 Number of method arguments.
Stack frame size 2
Untracked count 0
Var ptr tab count 0
Epilog at 28 0de60980 + 0x28 = 0de609a8 (end address from the u command below)

0:001> !u 0xd78bbc8 
Normal JIT generated code
[DEFAULT] [hasThis] Boolean Behavior1.Behavior1.Start()
Begin 0de60980, size 2f
0de60980 55               push    ebp
0de60981 8bec             mov     ebp,esp
0de60983 83ec08           sub     esp,0x8
0de60986 57               push    edi
0de60987 56               push    esi
0de60988 53               push    ebx
0de60989 8bf9             mov     edi,ecx
0de6098b 33db             xor     ebx,ebx
0de6098d 8b7704           mov     esi,[edi+0x4]
0de60990 6a00             push    0x0
0de60992 8bce             mov     ecx,esi
0de60994 baffffffff       mov     edx,0xffffffff
0de60999 8b01             mov     eax,[ecx]
0de6099b ff5050           call    dword ptr [eax+0x50]
0de6099e 90               nop
0de6099f bb01000000       mov     ebx,0x1
0de609a4 eb00             jmp     0de609a6
0de609a6 8bc3             mov     eax,ebx
0de609a8 5b               pop     ebx
0de609a9 5e               pop     esi
0de609aa 5f               pop     edi
0de609ab 8be5             mov     esp,ebp
0de609ad 5d               pop     ebp
0de609ae c3               ret

The pointer table shows the native instruction at each offset.  In the example above, the this pointer (EDI) is first used at (0xd78bbc8+0xB)